<template>
    <view class="content">
        <input type="text" v-model="val" @input="handleChange" />
    </view>
</template>

<script>
export default {
    props: {
        value: {
            type: String,
            default: null
        }
    },
    data() {
        return {
            val: this.value
        }
    },
    onLoad() {

    },
    methods: {
        handleChange(event) {
            console.log(this.val)
            this.$emit('input', this.val)
        }
    }
}
</script>